﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CluelessGame
{
    [Serializable]
    public abstract class Card
    {
        public string Name;

        public Card(string name)
        {
            this.Name = name;
        }

        public override string ToString()
        {
            return Name;
        }

        public static bool operator ==(Card a, Card b)
        {
            if ((object)a == null && (object)b == null)
                return true;
            if ((object)a == null || (object)b == null)
                return false;
            return a.Name == b.Name;
        }

        public static bool operator !=(Card a, Card b)
        {
            if ((object)a == null && (object)b == null)
                return false;
            if ((object)a == null || (object)b == null)
                return true;
            return a.Name != b.Name;
        }

        public override bool Equals(object obj)
        {
            return this == obj as Card;
        }

    }
}
